using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SmartLink.DTOS;
using SmartLink.DTOS.SysBasic;
using SmartLink.Domain;
using SmartLink.Domain.Entity;
using SmartLink.DTOS.Smart;

namespace SmartLink.Application.IServices
{
    public interface ISysBasicAppServices
    {
        #region  组织机构管理

        Results AddOrganization(InOrganizationDTO inOrganizationDTO);
        Results UpdateOrganization(UpdateOrganizationDTO inOrganizationDTO);
        Results DeleteOrganization(DeleteIDDto deleteIDDto);
        Results<PageData<OrganizationDTO>> GetOrganizationList(OrganizationPagePara PagePara);
        Results<IList<OrganizationNoPageDTO>> OrganizationListinfo();
        Results<UpdateOrganizationDTO> GetSingleOrganization(GetIDDTO getIDDTO);
        Results UpdateOrgStatus(UpdateOrgStatus updateOrgStatus);

        #endregion

        #region  组织架构管理
        /// <summary>
        /// 
        /// </summary>
        /// <param name="inOrganizationDeptDTO"></param>
        /// <returns></returns>
        Results AddOrganizationDept(InOrganizationDeptDTO inOrganizationDeptDTO, int userId, int curUserOid);

        Results DeleteOrganizationDept(DeleteIDDto deleteIDDto);

        Results UpdateOrganizationDept(UpdateOrganizationDeptDTO updateOrganizationDeptDTO, int userId);
        Results<PageData<OrganizationDeptDTO>> GetOrganizationDeptList(OrganizationDeptPagePara PagePara);
        Results<OrganizationDeptDTO> GetSingleOrganizationDept(GetIDDTO getIDDTO);
        Results<CompanyNode> GetDepartmentTree(int? OID);
        //DTOS.Results<DeptTreeNode> GetAllDeptTree(int OID, int curUserOID);
        Results<IList<OrganizationDeptDTO>> GetAllStoreByOrgId(int orgId);
        #endregion

        #region 获取字典
        Results<List<DictionaryDTO>> DictionaryList(string categoryValue);

        Results<List<DictionaryDTO>> GetAllDic();

        Results<Dictionary<string, List<DictionaryDTO>>> ArrayDictionaryList(string categorys);

        Results AddDictionary(DictionaryDTO model, int creator);

        #endregion


        Results<CompanyNode> GetCompanyTree(int UserId, TreeFlagDTO treeFlagDTO);
        /// <summary>
        /// 获取组织树（包含部门和子公司）
        /// </summary>
        /// <param name="oid">机构ID</param>
        /// <param name="toRoot">是否向上获取根机构下数据</param>
        /// <returns></returns>
        Results<CompanyNode> GetOrgTree(int? oid = null, bool toRoot = false);
        /// <summary>
        /// 获取公司节点及子节点树（仅含公司）
        /// <param name="oid">机构ID</param>
        /// <param name="toRoot">是否向上获取根机构下数据</param>
        /// </summary>
        Results<CompanyNode> GetCompanyNodeTree(int? oid = null, bool toRoot = false);
        /// <summary>
        /// 获取公司节点及子节点列表（仅含公司）
        /// <param name="oid">机构ID</param>
        /// <param name="toRoot">是否向上获取根机构下数据</param>
        /// </summary>
        Results<IList<OrgListItemDTO>> GetCompanyNodeList(int? oid = null, bool toRoot = false);
   
        Results<List<AreaDTO>> GetAreaList();

        Results<List<EnumItemDTO>> GetEnumItems(EnumKeyDTO enumKey);

        Results AddSysParamSettings(int curUseID, int oid, SysParamsDTO sysParamsDTO);
    }
}
